home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_10.lha
/
7_10
/
process.h
< prev
next >
Wrap
Text File
|
1993-08-08
|
903b
|
42 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Exercise 7.10
/ Implement a library for writing event-driven simulations.
ifndef PROCESS_H
define PROCESS_H
include <stream.h>
include <string.h>
include <setjmp.h>
include <error.h>
include <stackdir.h>
include "7_10pr0.h" /* EXPAND */
lass queue_head;
lass queue_tail;
lass process;
include "7_10po.h" /* EXPAND: PVFPC, process_link, process_object */
include "7_10q.h" /* EXPAND: process_queue, queue_head, queue_tail */
lass semaphore : public process_object
ublic:
int pending(); // is semaphore lock clear?
;
lass interrupt : public process_object
ublic:
int pending(); // is interrupt clear?
;
include "7_10process.h" /* EXPAND class process */
include "7_10main.c" /* EXPAND main_process(), this_process() */
endif /* PROCESS_H */